package io.renren.modules.canteens.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import io.renren.common.service.impl.CrudServiceImpl;
import io.renren.modules.canteens.dao.BatchDao;
import io.renren.modules.canteens.dto.BatchDTO;
import io.renren.modules.canteens.entity.BatchEntity;
import io.renren.modules.canteens.service.BatchService;
import org.apache.commons.lang3.StringUtils;
import org.springframework.stereotype.Service;

import java.util.Map;

/**
 * 批量采购表
 *
 * @author 罗胜平 781757616@qq.com
 * @since 1.0.0 2019-11-22
 */
@Service
public class BatchServiceImpl extends CrudServiceImpl<BatchDao, BatchEntity, BatchDTO> implements BatchService {

    @Override
    public QueryWrapper<BatchEntity> getWrapper(Map<String, Object> params){
        String id = (String)params.get("id");

        QueryWrapper<BatchEntity> wrapper = new QueryWrapper<>();
        wrapper.eq(StringUtils.isNotBlank(id), "id", id);

        return wrapper;
    }


}